package com.active.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;

/**
 * Created by Administrator on 2017/6/3 0003.
 */
@Configuration
@Data
public class EnvConfig {

    //mysql
    @Value("${jdbc.username}")
    private String name;

    @Value("${jdbc.password}")
    private String password;

    @Value("${jdbc.driver}")
    private String driver;

    @Value("${jdbc.connectionURL}")
    private String connectionURL;

    @Value("${spring.mail.host}")
    private String mailHost;

    @Value("${spring.mail.username}")
    private String mailUserName;

    @Value("${spring.mail.password}")
    private String mailPassword;

    @Value("${spring.mail.port}")
    private Integer mailPort;



    //redis
//    @Value("${redis.pool.maxTotal}")
//    private int maxTotal;
//
//    @Value("${redis.pool.maxIdle}")
//    private int maxIdle;
//
//    @Value("${redis.pool.maxWait}")
//    private long maxWaitMillis;
//
//    @Value("${redis.pool.testOnBorrow}")
//    private boolean testOnBorrow;
//
//    @Value("${redis.ip}")
//    private String redis_host;
//
//    @Value("${redis.port}")
//    private Integer redis_port;


    @Bean
    public static PropertySourcesPlaceholderConfigurer propertyConfigure() {
        return new PropertySourcesPlaceholderConfigurer();
    }
}
